<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Uses Units Tools</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="../css/style.css" type="text/css">
</head>

<body>
<table width="100%" border="0" cellpadding="4">
  <tr>
    <td class="head" height="16">Uses Units Tools</td>
  </tr>
  <tr>
    <td bgcolor="#FF9900" height="6"></td>
  </tr>
  <tr>
    <td height=6></td>
  </tr>
</table>
<p class="title">Uses Units Cleaner</p>
<p class="text" align="left"> This tool is used to remove the unused reference units in 'uses' part. Only Delphi is supported now.</p>
<p class="text" align="left"> When a component is put into form in design time, the units which contains the component will be added into uses part automatically. But NO removing when component is removing. This tool can search the uses part and analyze them to list the possible unused reference units to clean.</p>
<p class="text" align="left"> The dialog is shown as below:</p>
<p class="text" align="center">
  <img src="usescleaner.png"> </p>
<p class="text" align="left"> Content and Clean Settings:</p>
<ul>
  <li>
<p class="text" align="left"><b>Current Unit</b>: Search current unit.</p>
  </li>
	<li>
<p class="text" align="left"><b>Opened Units in Current ProjectGroup</b>: Search opened units in current ProjectGroup.</p>
  </li>
	<li>
<p class="text" align="left"><b>All Units in Current Project</b>: Search all units in current project.</p>
  </li>
	<li>
<p class="text" align="left"><b>All Units in Current ProjectGroup</b>: Search all units in current ProjectGroup.</p>
  </li>
  <li>
<p class="text" align="left"><b>Include Indirectly Used Units</b>: If checked, uses cleaner will process the indirectly used units with source, not only in Project or ProjectGroup.</p>
  </li>
	<li>
<p class="text" align="left"><b>Skip Used Units including Initialization Part</b>: Whether skip those units which contain initialization part in searching. The part may contains some initialization operations and removing the reference may cause problems.</p>
  </li>
  <li>
<p class="text" align="left"><b>Skip Used Units including Register Procedure.</b>: Whether skip those units which contain Register procedure in searching. This procedure may contain component register content. </p>
  </li>
  <li>
<p class="text" align="left"><b>Skip Used Units Refered by Component Indirectly.</b>: Whether skip those units which refered by component indirectly, such as ancestor definitions or components in other forms. </p>
  </li>
  <li>
<p class="text" align="left"><b>Skip Used Units without Source</b>: Whether skip those units without source code in searching.</p>
  </li>
  <li>
<p class="text" align="left"><b>Auto Save/Close Unopened Files</b>: Defaultly, this tool will open files in IDE and do the file changes without saving and close. It will cause memory exhausted when meeting huge project. If this option checked, this tool will auto save and close file after processing and can't undo the change.</p>
  </li>
  <li>
<p class="text" align="left"><b>Clean Units Directly</b>: Clean the units below directly.</p>
  </li>
  <li>
<p class="text" align="left"><b>Skip Units Directly</b>: Skip the units below directly. They're almost system units.</p>
  </li>
  <li>
<p class="text"><b>Process</b>: Search unused reference units according to the settings.</p></li>
  <li>
<p class="text"><b>Cancel</b>: Close this window and DO NOT clean.</p></li>
  <li>
<p class="text"><b>Help</b>: Show this help.</p></li>
</ul>
<p class="text" align="left"></p>
<p class="title">&nbsp;</p>
<p class="title">Uses Units Cleaner Scan Result</p>
<p class="text" align="left">After you click the 'Process' button. This tool will compile current content and search and list the result in a treeview as below. The checked units are those can be cleaned. You can confirm or discard them. The unchecked units are already skipped by some settings.</p>
<p class="text" align="center">&nbsp;<img src="usescleanerres.png"></p>
<p class="text" align="left">
<ul>
  <li>
<p class="text"><b>Clean</b>: Remove the checked reference units.</p></li>
	<li>
<p class="text"><b>Cancel</b>: Close this window and DO NOT clean.</p></li>
  <li>
<p class="text"><b>Help</b>: Show this help.</p></li>
</ul>
<p class="text" align="left"></p>
<p class="title">&nbsp;</p>
<p class="title">Uses Initialization Tree</p>
<p class="text" align="left">This tool can analyse compiled units in project and list their initialization order into a tree with location type and uses type.</p>
<p class="text" align="left">The window is shown as below, including initialization tree, display filter and unit information.</p>
<p class="text" align="center">&nbsp;<img src="usesinittree.png"></p>
<p class="text" align="left">
<ul>
  <li>
<p class="text"><b>Exit</b>: Close this Window.</p></li>
  <li>
<p class="text"><b>Project</b>: Choose project to analyse. Default is current project.</p></li>
	<li>
<p class="text"><b>Analyse Project</b>: Press this button to compile and analyse dcu files to generate the initialization tree.</p></li>
  <li>
<p class="text"><b>Export</b>: Save tree content to a text file.</p></li>
	<li>
<p class="text"><b>Open</b>: Open selected source file in IDE.</p></li>
  <li>
<p class="text"><b>Open in Explorer</b>: Open windows explorer and locate selected file.</p></li>
  <li>
<p class="text"><b>Search</b>: Show search dialog to search text in tree.</p></li>
  <li>
<p class="text"><b>Search Next</b>: Repeat search for previous text.</p></li>
	<li>
<p class="text"><b>Help</b>: Show this Help.</p></li>
	<li>
<p class="text"><b>Units in Project Search Path</b>: Whether show units in Project Search Path to tree.</p></li>
	<li>
<p class="text"><b>Units in System Search Path</b>: Whether show units in System Search Path to tree.</p></li>
</ul>
<p class="title">&nbsp;</p>
<p class="title">Use Unit from Identifier</p>
<p class="text" align="left">This tool can analysis all dcu files in library and obtain exported symbols for Searching and use. You can select a unit from list and add it to interface or implementation part in current source file.</p>
<p class="text" align="left">The window is shown as below.</p>
<p class="text" align="center"><img src="usesfromident.png"></p>
<p class="text" align="left">
<ul>
  <li>
<p class="text"><b>Use Selected Unit</b>: Use selected unit for Current Unit in IDE.</p></li>
  <li>
<p class="text"><b>Copy Selected Unit Name to Clipboard</b>: Copy selected unit name to clipboard.</p></li>
  <li>
<p class="text"><b>Match Identifier Start</b>: Match the identifier head when searching.</p></li>
  <li>
<p class="text"><b>Match All Parts of Identifier</b>: Match any position of identifier when searching.</p></li>
  <li>
<p class="text"><b>Fuzzy Match of Identifier</b>: Fuzzy Match of identifier when searching.</p></li>
  <li>
<p class="text"><b>Font</b>: Change font of list.</p></li>
  <li>
<p class="text"><b>Help</b>: Show this Help.</p></li>
  <li>
<p class="text"><b>Exit</b>: Close this Window and Exit.</p></li>
</ul>
<p class="title" align="left">&nbsp;
<p class="title">Links</p>
<p class="text" align="left">
<a href="wizards.htm">Basic Operation</a><p class="text" align="left">
<a href="../options/wizconfig.htm">CnWizards Settings</a><p class="text" align="left">
<a href="../cnpack/index.htm">About CnWizards</a>
<p class="text" align="left">&nbsp; 
<hr>
<p class="text" align="center"><a href="http://www.cnpack.org">Copyrights 2001-2022 CnPack Team</a></p>
</body>
</html>